package com.the475group.obd.enums;

public enum OBDTrouble {
	PROBLEMA("","","");
	
	private String code;
	private String name;
	private String desc;
	
	
	private OBDTrouble(String code, String name, String desc) {
		this.code = code;
		this.name = name;
		this.desc = desc;
	}
	
	public OBDTrouble getTroubleByCode(String code){
		for(OBDTrouble t : values()){
			if(t.getCode().equals(code)){
				return t;
			}
		}
		return null;
	}
	
	
	public String getCode() {
		return code;
	}
	public String getName() {
		return name;
	}
	public String getDesc() {
		return desc;
	}
	
	
}
